/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;


/**
 *
 * @author Daron Dima
 */
public class Deck {
     private static final List<Card> deck = new ArrayList<>();
    
    // Initialize the static deck
    static {
        for (Card.Suit suit : Card.Suit.values()) {
            for (Card.Rank rank : Card.Rank.values()) {
                deck.add(new Card(rank, suit));
            }
        }
    }

    public static ArrayList<Card> newDeck() {// Return copy of prototype deck
        Collections.shuffle(deck);
        return new ArrayList<>(deck);
    }
   
}
